package com.jeremy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jeremy.entity.User;
import com.jeremy.mapper.UserMapper;
import com.jeremy.service.UserService;

@Service
public class UserServiceImpl implements UserService{
	
	@Autowired
	private UserMapper mapper;
	
	@Override
	public void addUser(User user) {
		mapper.addUser(user);
	}

	@Override
	public List<User> findAll() {
		return mapper.findAll();
	}

	@Override
	public void updateUser(User user) {
		mapper.updateUser(user);
	}

	@Override
	public User findOne(Long id) {
		return mapper.findOne(id);
	}

	@Override
	public void deleteUser(Long id) {
		mapper.deleteUser(id);
	}

}
